package student.aistar.model.dto;

import java.util.List;

public class PageDTO<T> {
    private Integer pageNow;//当前页

    private Integer pageSize;//每页显示条数

    private Integer pageCount;//总的页数

    //private Integer rows;//总的条数

    //页面上分页的具体的内容
    private List<T> dataList;

    public PageDTO() {
    }

    public PageDTO(Integer pageNow, Integer pageSize, Integer pageCount, List<T> dataList) {
        this.pageNow = pageNow;
        this.pageSize = pageSize;
        this.pageCount = pageCount;
        this.dataList = dataList;
    }

    public Integer getPageNow() {
        return pageNow;
    }

    public void setPageNow(Integer pageNow) {
        this.pageNow = pageNow;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public List<T> getDataList() {
        return dataList;
    }

    public void setDataList(List<T> dataList) {
        this.dataList = dataList;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("PageDTO{");
        sb.append("pageNow=").append(pageNow);
        sb.append(", pageSize=").append(pageSize);
        sb.append(", pageCount=").append(pageCount);
        sb.append(", dataList=").append(dataList);
        sb.append('}');
        return sb.toString();
    }
}
